#每日提取新增数据
DT=`date -d '-1 day' +%Y-%m-%d`

sqoop import "-Dorg.apache.sqoop.splitter.allow_text_splitter=true" \
--connect 'jdbc:mysql://106.75.33.59:3306/teach?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true' \
--username itcast_edu_stu \
--password itcast_edu_stu \
--query "select * from student_leave_apply where 1=1 and create_time between '${DT} 00:00:00' and '${DT} 23:59:59'  \$CONDITIONS" \
--hcatalog-database edu_online_ods \
--hcatalog-table student_leave_apply \
-m 1

sqoop import "-Dorg.apache.sqoop.splitter.allow_text_splitter=true" \
--connect 'jdbc:mysql://106.75.33.59:3306/teach?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true' \
--username itcast_edu_stu \
--password itcast_edu_stu \
--query "select * from tbh_student_signin_record where 1=1 and signin_time between '${DT} 00:00:00' and '${DT} 23:59:59'  \$CONDITIONS" \
--hcatalog-database edu_online_ods \
--hcatalog-table tbh_student_signin_record \
-m 1